home *** CD-ROM | disk | FTP | other *** search
- onClipEvent(enterFrame){
- if(7200 < _root.sco)
- {
- if(st == 1)
- {
- att = true;
- st = 0;
- }
- }
- if(_root.amitavaplay == false)
- {
- att = false;
- }
- if(att == true)
- {
- dx = _X - _root.tank._x;
- dy = _Y - _root.tank._y;
- d = Math.sqrt(dx * dx + dy * dy);
- if(50 < d)
- {
- rad = Math.atan2(dy,dx) + 3.141592653589793;
- deg = rad * 180 / 3.141592653589793;
- _rotation = deg;
- b = 3 * Math.cos(rad);
- p = 3 * Math.sin(rad);
- _X = _X + b;
- _Y = _Y + p;
- }
- else if(0 < _root.amithealth)
- {
- _alpha = _alpha - 1;
- if(_alpha < 1)
- {
- att = false;
- this.x = -3000;
- }
- }
- }
- }
-